home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / epmgcc30.zip / GCC.E < prev    next >
Text File  |  1996-07-06  |  34KB  |  946 lines

  1. /*
  2. ╔══════════════════════════════════════════════════════════════════════════════╗
  3. ║ What's it called: EPMGCC  V3.00                                              ║
  4. ║                                                                              ║
  5. ║ What does it do:  The E source code for the GCC-Interface for EPM.           ║
  6. ║                   This file contains the menu definitions and procedures.    ║
  7. ║                                                                              ║
  8. ║ Who and When:     B. Bablok 12/93 - 07/96                                    ║
  9. ║                                                                              ║
  10. ╚══════════════════════════════════════════════════════════════════════════════╝
  11. */
  12. TRYINCLUDE 'gccenv.e'
  13. TRYINCLUDE 'gccconst.e'
  14. /*
  15. ┌──────────────────────────────────────────────────────────────────────────────┐
  16. │  DEFINIT: Initialize EPMGCC variables and post menu build                    │
  17. └──────────────────────────────────────────────────────────────────────────────┘
  18. */
  19. DEFINIT
  20.     UNIVERSAL gcc_project,            -- project name
  21.               gcc_project_file,       -- make file name
  22.               gcc_sel_projects,       -- previously selected projects
  23.               gcc_d_comp_options,     -- compile options (debug)
  24.               gcc_p_comp_options,     -- compile options (production)
  25.               gcc_d_make_options,     -- make    options (debug)
  26.               gcc_p_make_options,     -- make    options (production)
  27.               gcc_error_file,         -- latest error-file
  28.               gcc_error_file_id,      -- ID of latest error-file
  29.               gcc_line2index,         -- ID of array
  30.               gcc_index2err,          -- ID of array
  31.               gcc_error_index,        -- index of current error
  32.               gcc_debug,              -- debug mode
  33.               gcc_autosave,           -- auto-save mode
  34.               gcc_verbose,            -- verbose mode
  35.               gcc_remove,             -- .err-remove mode
  36.               gcc_runtime_arguments,  -- runtime arguments
  37.               gcc_debug_arguments,    -- runtime arguments for debugger
  38.               gcc_edit_cmd,           -- command to start makefile edit
  39.               gcc_compile_cmd,        -- command to start compiler
  40.               gcc_build_cmd,          -- command to start make
  41.               gcc_debug_cmd,          -- command to start debug
  42.               gcc_translate,          -- translate \ to / in filenames
  43.               gcc_parser_mod,         -- current error-parser module
  44.               gcc_save_settings       -- save settings to epm.ini
  45.  
  46.     UNIVERSAL app_hini
  47.  
  48.     gcc_project           = ''
  49.     gcc_sel_projects      = QUERYPROFILE(app_hini,'GCC','GCC_SEL_PROJECTS')
  50.     gcc_project_file      = ''
  51.     gcc_error_file        = ''
  52.     gcc_error_file_id     = ''
  53.     gcc_line2index        = ''
  54.     gcc_index2err         = ''
  55.     gcc_error_index       = 0
  56.  
  57.     gcc_save_settings     = QUERYPROFILE(app_hini,'GCC','GCC_SETTINGS_MODE')
  58.     if gcc_save_settings = 1 then    -- settings were saved the last time
  59.  
  60.        gcc_debug             = QUERYPROFILE(app_hini,'GCC','GCC_DEBUG_MODE')
  61.        gcc_autosave          = QUERYPROFILE(app_hini,'GCC','GCC_AUTOSAVE_FILE')
  62.        gcc_verbose           = QUERYPROFILE(app_hini,'GCC','GCC_VERBOSE_MODE')
  63.        gcc_remove            = QUERYPROFILE(app_hini,'GCC','GCC_REMOVE_MODE')
  64.  
  65.        gcc_d_comp_options    = QUERYPROFILE(app_hini,'GCC','GCC_D_COMPILE_OPTIONS')
  66.        gcc_p_comp_options    = QUERYPROFILE(app_hini,'GCC','GCC_P_COMPILE_OPTIONS')
  67.        gcc_d_make_options    = QUERYPROFILE(app_hini,'GCC','GCC_D_BUILD_OPTIONS')
  68.        gcc_p_make_options    = QUERYPROFILE(app_hini,'GCC','GCC_P_BUILD_OPTIONS')
  69.  
  70.        gcc_edit_cmd          = QUERYPROFILE(app_hini,'GCC','GCC_EDIT_COMMAND')
  71.        gcc_compile_cmd       = QUERYPROFILE(app_hini,'GCC','GCC_COMP_COMMAND')
  72.        gcc_build_cmd         = QUERYPROFILE(app_hini,'GCC','GCC_BUILD_COMMAND')
  73.        gcc_debug_cmd         = QUERYPROFILE(app_hini,'GCC','GCC_DEBUG_COMMAND')
  74.        gcc_translate         = QUERYPROFILE(app_hini,'GCC','GCC_WANT_TRANSLATE')
  75.        gcc_parser_mod        = QUERYPROFILE(app_hini,'GCC','GCC_PARSER_MODULE')
  76.  
  77.        gcc_runtime_arguments = QUERYPROFILE(app_hini,'GCC','GCC_RT_ARGS')
  78.        gcc_debug_arguments   = QUERYPROFILE(app_hini,'GCC','GCC_DB_ARGS')
  79.  
  80.     else
  81.  
  82.        gcc_debug             = GCC_DEBUG_MODE
  83.        gcc_autosave          = GCC_AUTOSAVE_FILE
  84.        gcc_verbose           = GCC_VERBOSE_MODE
  85.        gcc_remove            = GCC_REMOVE_MODE
  86.        gcc_save_settings     = GCC_SETTINGS_MODE
  87.  
  88.        gcc_d_comp_options    = GCC_D_COMPILE_OPTIONS
  89.        gcc_p_comp_options    = GCC_P_COMPILE_OPTIONS
  90.        gcc_d_make_options    = GCC_D_BUILD_OPTIONS
  91.        gcc_p_make_options    = GCC_P_BUILD_OPTIONS
  92.  
  93.        gcc_edit_cmd          = GCC_EDIT_COMMAND
  94.        gcc_compile_cmd       = GCC_COMP_COMMAND
  95.        gcc_build_cmd         = GCC_BUILD_COMMAND
  96.        gcc_debug_cmd         = GCC_DEBUG_COMMAND
  97.        gcc_translate         = GCC_WANT_TRANSLATE
  98.        gcc_parser_mod        = GCC_PARSER_MODULE
  99.  
  100.        gcc_runtime_arguments = ''
  101.        gcc_debug_arguments   = ''
  102.     endif
  103.  
  104.     'PostMe BuildGCCMenu'
  105.     'PostMe LINK' gcc_parser_mod
  106.     'PostMe SAYERROR Current parser module:' gcc_parser_mod
  107. /*
  108. ┌──────────────────────────────────────────────────────────────────────────────┐
  109. │  DEFEXIT: Save EPMGCC variables if necessary                                 │
  110. └──────────────────────────────────────────────────────────────────────────────┘
  111. */
  112. DEFEXIT
  113.     UNIVERSAL gcc_sel_projects,       -- previously selected projects
  114.               gcc_d_comp_options,     -- compile options (debug)
  115.               gcc_p_comp_options,     -- compile options (production)
  116.               gcc_d_make_options,     -- make    options (debug)
  117.               gcc_p_make_options,     -- make    options (production)
  118.               gcc_debug,              -- debug mode
  119.               gcc_autosave,           -- auto-save mode
  120.               gcc_verbose,            -- verbose mode
  121.               gcc_remove,             -- .err-remove mode
  122.               gcc_runtime_arguments,  -- runtime arguments
  123.               gcc_debug_arguments,    -- runtime arguments for debugger
  124.               gcc_edit_cmd,           -- command to start makefile edit
  125.               gcc_compile_cmd,        -- command to start compiler
  126.               gcc_build_cmd,          -- command to start make
  127.               gcc_debug_cmd,          -- command to start debug
  128.               gcc_translate,          -- translate \ to / in filenames
  129.               gcc_parser_mod,         -- current error-parser module
  130.               gcc_save_settings       -- save settings to epm.ini
  131.  
  132.     UNIVERSAL app_hini
  133.  
  134.     CALL SETPROFILE(app_hini,'GCC','GCC_SEL_PROJECTS',gcc_sel_projects)
  135.     CALL SETPROFILE(app_hini,'GCC','GCC_SETTINGS_MODE',gcc_save_settings)
  136.  
  137.     if gcc_save_settings = 1 then
  138.  
  139.        CALL SETPROFILE(app_hini,'GCC','GCC_DEBUG_MODE',gcc_debug)
  140.        CALL SETPROFILE(app_hini,'GCC','GCC_AUTOSAVE_FILE',gcc_autosave)
  141.        CALL SETPROFILE(app_hini,'GCC','GCC_VERBOSE_MODE',gcc_verbose)
  142.        CALL SETPROFILE(app_hini,'GCC','GCC_REMOVE_MODE',gcc_remove)
  143.  
  144.        CALL SETPROFILE(app_hini,'GCC','GCC_D_COMPILE_OPTIONS',gcc_d_comp_options)
  145.        CALL SETPROFILE(app_hini,'GCC','GCC_P_COMPILE_OPTIONS',gcc_p_comp_options)
  146.        CALL SETPROFILE(app_hini,'GCC','GCC_D_BUILD_OPTIONS',gcc_d_make_options)
  147.        CALL SETPROFILE(app_hini,'GCC','GCC_P_BUILD_OPTIONS',gcc_p_make_options)
  148.  
  149.        CALL SETPROFILE(app_hini,'GCC','GCC_EDIT_COMMAND',gcc_edit_cmd)
  150.        CALL SETPROFILE(app_hini,'GCC','GCC_COMP_COMMAND',gcc_compile_cmd)
  151.        CALL SETPROFILE(app_hini,'GCC','GCC_BUILD_COMMAND',gcc_build_cmd)
  152.        CALL SETPROFILE(app_hini,'GCC','GCC_DEBUG_COMMAND',gcc_debug_cmd)
  153.        CALL SETPROFILE(app_hini,'GCC','GCC_WANT_TRANSLATE',gcc_translate)
  154.        CALL SETPROFILE(app_hini,'GCC','GCC_PARSER_MODULE',gcc_parser_mod)
  155.  
  156.        CALL SETPROFILE(app_hini,'GCC','GCC_RT_ARGS',gcc_runtime_a